/**
 * Created by yy on 2017/7/22.
 */
$(function(){
    var url1 = location.search;
    if (url1.indexOf("?") != -1) {
        var id = url1.substr(4);}
    var url2 = server + '/server/business/workMessageRest/detail/'+id+'.json';
    $.post(url2, function(data){
        var ctx = template('./job-details-tpl', data);
        $("#job-details").html(ctx);
        slideToggle1();
    });


});

function slideToggle1(){

    /*职位详情下拉按钮*/
    $('.job-details-content h6 span').click(function(){
        if($(this).hasClass('glyphicon-chevron-up')){
            $(this).removeClass('glyphicon-chevron-up');
            $(this).addClass('glyphicon-chevron-down');
            $(this).parent().prev().find('li:nth-child(n+3)').slideUp(100);

        }else{
            $(this).addClass('glyphicon-chevron-up');
            $(this).removeClass('glyphicon-chevron-down');
            $(this).parent().prev().find('li:nth-child(n+3)').slideDown(100);
        }
    });

    /*职位详情页面end*/
}